const vscode = require('vscode')

/**
 * 展示信息提示框
 *
 * @param {string} content 提示内容
 * @returns {Thenable<string>}
 */
const showInfo = (content) => {
    return vscode.window.showInformationMessage(content);
}

/**
 * 提示信息并重启
 *
 * @param {string} content 提示内容
 * @returns {Thenable<void>}
 */
const showInfoRestart = (content) => {
    return vscode.window.showInformationMessage(content, { title: 'Restart vscode' }).then(function (item) {
        if (!item) return;
        vscode.commands.executeCommand('workbench.action.reloadWindow');
    });
}

module.exports = {
    showInfo,
    showInfoRestart
}
